<template>
    <div style="background-color: pink;">
        我是女孩
        <h3>1.子传父练习</h3>
        <button @click="$emit('handleGirl',{data:100})">向老爸汇报成绩</button>
        <h3>数据状态管理练习</h3>
        <button @click="store.decrement(1000)">我要交学费，从老爸金库拿一点</button>
        <h3>3.父传子练习</h3>
        老爸给我的奖励{{ moneyGirl }}
    </div>
</template>
<script setup>
import useCounterStore from '../stores/counter';
const store = useCounterStore()
//接受父亲的传值
defineProps(['moneyGirl'])
</script>